// 云函数入口文件
const cloud = require('wx-server-sdk')
const oplist = ['oJwuI5NlrQGf-PJyJL-ZwHxhJRMk', 'oJwuI5JhCjdXzQ7yUFmuQFCidIME', 'oJwuI5P4l0rzxc0p4yZDXj2B4XpY','5F1101F27F68C2331B7EEF0C82448B47'];
cloud.init()

// 云函数入口函数
exports.main = async (event, context) => {
  const wxContext = cloud.getWXContext()
  let openid = wxContext.OPENID;
  if(event.openid){
    openid=event.openid
  }

  if(oplist.find(v=>{return v==openid})){
    return {
      status:true
    }
  }
  else{
    return {status:false}
  }
}